package com.sbpm.crmbpm.client.grid;

import com.sbpm.crmbpm.client.forms.companies.CompanyForm;
import com.sbpm.crmbpm.client.handlers.EditCompanyDoubleClickHandler;
import com.sbpm.crmbpm.shared.data.client.Company;
import com.sencha.gxt.data.shared.ListStore;
import com.sencha.gxt.widget.core.client.grid.Grid;

public class CompanyGrid extends Grid<Company>
{

    public CompanyGrid( final CompanyForm companyForm )
    {
        super( new ListStore<Company>( CompanyColumnModelFactory.PROPS.key()), CompanyColumnModelFactory.createClientColumnModel() );

        getView().setForceFit( true );
        setMonitorWindowResize( true );
//        getView().setAutoFill( true );
//        setHeight( "100%" );


        addRowDoubleClickHandler( new EditCompanyDoubleClickHandler( this, companyForm ) );
    }
}
